<template>
    <Header v-if="!isError"></Header>
    <router-view></router-view>
    <Footer v-if="!isError"></Footer>
</template>

<script>
    import Header from './components/Header.vue';
    import Footer from './components/Footer.vue';

    export default {
        components: {
            Header,
            Footer
        },
        computed: {
            /**
             * 页面是否发生错误
             */
            isError() {
                return this.$route.name === 'NotFound';
            }
        }
    }
</script>
